package com.runfast.waimai.web.controller.count;


import com.runfast.waimai.service.RunfastGoodsSellRecordService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * ${DESCRIPTION}   统计（各种统计信息）
 *
 * @author chenzheng
 * @create 2018-05-09 9:57
 **/
@RestController("countController")
@RequestMapping("/server/count")
public class CountController {
    @Autowired
    private RunfastGoodsSellRecordService runfastGoodsSellRecordService;
    /**
     * 统计当天，当月交易金额，订单数量
     * */
    /*@GetMapping("/findPriceByDay")
    @RequiresPermissions("server:count:findPriceByDay")
    public  List<Map<String, Object>> findPriceByDay(){
        Date date = new Date();
        SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
        Map<Object,Object> map=new HashMap<Object, Object>();
        map.put("businessid",null);
        map.put("today",sim.format(date));
        //List<Map<String, Object>> list=runfastGoodsSellRecordService.findPriceByDay(map);
        List<Map<String, Object>> list=runfastGoodsSellRecordService.findPriceByDay(map);
        System.out.println();
        return  null;
    }*/

    /**
     * 统计当天实时交易金额，订单数量（要做轮训查询，每隔多少分钟查一下）
     * */

}
